You can create your own filter effects — smoothing, sharpening, intensifying, enhancing — by convolving an image with a customized 2D or 3D kernel. Convolution is done by multiplying a pixel’s value and its neighboring pixel values by a matrix and then determining the value of a central pixel by adding the weighted values of all its neighbors together. You should note that differently sized kernels containing different patterns of numbers, as shown in the simple example below, will produce different results under convolution.
Edited kernel for the convolution filter
Below are a number of kernel examples with matrices that can produce different effects.
1 |
1 |
1 |
|
0 |
1 |
0 |
|
0 |
-1 |
0 |
|
-1 |
-1 |
-1 |
1 |
1 |
1 |
|
1 |
4 |
1 |
|
-1 |
5 |
-1 |
|
-1 |
9 |
-1 |
1 |
1 |
1 |
|
0 |
1 |
0 |
|
0 |
-1 |
0 |
|
-1 |
-1 |
-1 |
Unweighted 3x3 smoothing kernel |
|
Weighted 3x3 smoothing kernel with Gaussian blur |
|
Kernel to make images sharper |
|
Intensified sharper image |
You should note that larger kernels can increase filtering effects. In the example below, the smoother area increases with the larger kernel area.
0 |
1 |
2 |
1 |
0 |
1 |
4 |
8 |
4 |
1 |
2 |
8 |
16 |
8 |
2 |
1 |
4 |
8 |
4 |
1 |
0 |
1 |
2 |
1 |
0 |
If you are working with a 3D shape, you can navigate between the different planes with the drop-down menu or the Next and Previous icons.
If required, you can modify the matrix values or choose another shape.